<?php
namespace App\Http\Service\Pay;


use App\Http\Service\Basic\BasicService;
use Config;

class PayService extends BasicService
{

    /**
     * 调起阿里支付
     */
    public function SlingAliPay($order)
    {

        return $this->curlLogic->callWebServer(Config::get('custom.setting.BASE_API_PATH') . Config::get('custom.api.alipay'),$order,'get');
    }

    /**
     * @param $order
     * @return bool|mixed|string
     * 吊起微信扫码支付
     */
    public function SlingWxPay($order)
    {
//        dd(Config::get('custom.setting.BASE_API_PATH') . Config::get('custom.api.wxpay'), json_encode($order,JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE), 'post');
        return $this->curlLogic->callWebServer(Config::get('custom.setting.BASE_API_PATH') . Config::get('custom.api.wxpay'), json_encode($order,JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE), 'post');
    }

    /**
     * @param $where
     * 检测微信扫码支付订单状态
     */
    public function checkWxPayOrderStatus($where)
    {
//        dd(Config::get('custom.setting.BASE_API_PATH') . Config::get('custom.api.check_wxpay_order_status'), json_encode($where,JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE), 'post');
        return $this->curlLogic->callWebServer(Config::get('custom.setting.BASE_API_PATH') . Config::get('custom.api.check_wxpay_order_status'), json_encode($where,JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE), 'post');
    }



}